package com.hycas.scanner;

import java.util.Scanner;

public class Demo02 {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        System.out.println("用nextline方法让用户输入：");
        if (scanner.hasNextLine()){
            String inLine=scanner.nextLine();//接收回车键之前的所有字符
            System.out.println("nextline输出的是："+inLine);
        }
        scanner.close();
    }
}
